/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.commands;

import org.jfonia.view.labels.Label;
import org.jfonia.view.labels.Labels;

/**
 *
 * @author Rik Bauwens
 */
public class AddLabelCommand extends Command
{
        private Labels labels;
        private Label label;

        public AddLabelCommand(Labels labels, Label label)
        {
                super();
                this.labels = labels;
                this.label = label;
        }

        @Override
        protected void execute()
        {
                labels.addLabel(label);
        }

        @Override
        protected void undo()
        {
                labels.removeLabel(label);
        }
}
